
import { registerClass } from "../../../cfw/tools/class_decorator";
import BaseAd from "../../core/base/BaseAd";

@registerClass('ViGooInsertAd')
export default class ViGooInsertAd extends BaseAd {
    hide(): void {
        throw new Error("Method not implemented.");
    }
    destroy(): void {

    }

    open() {
        this.show();
    }

    load(): void {
        if (this.ad) {
            this.ad.load();
        }
    }

    create() {

    }

    show() {
        console.log(' ViGooInsertAd show ', this.adUnitID)
        this.sdk.ShowScreenVideo(this.adUnitID, (ret: any) => {
            // ret.type = ‘1’表示播放失败
            console.log(' ViGooInsertAd show  ret.type  ', ret.type)
            const type = ret.type;
            if (type == 1) {

            } else {

            }

        });
    }
}